

package com.hazelcast.jet.pipeline.file.impl;

import com.hazelcast.jet.core.ProcessorMetaSupplier;
import com.hazelcast.jet.pipeline.file.FileSourceBuilder;

import javax.annotation.Nonnull;

/**
 * A factory of {@link ProcessorMetaSupplier} based on a {@link
 * FileSourceBuilder}.
 */
public interface FileSourceFactory {

    /**
     * Returns a {@link ProcessorMetaSupplier} that behaves as specified by the
     * provided file source builder.
     *
     * @param configuration the configuration object to use to create the supplier
     * @param <T>           type of the item the source created by the supplier emits
     */
    @Nonnull
    <T> ProcessorMetaSupplier create(@Nonnull FileSourceConfiguration<T> configuration);
}
